/**
 * 
 */
package uit.comstore.model.entity;
import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author XIII
 *
 */
@Entity
@Table(name="Categories")
@SuppressWarnings("serial")
public class Category implements Serializable {

	private Long id;
	private String name;
	private String url;
	private Long parentId;
	private Integer status;

	
	@Id
	@GeneratedValue
	@Column(name="CategoriesId")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name="CategoriesName")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name="CategoriesURL")
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	
	@Column(name="ParentId")
	public Long getParentId() {
		return parentId;
	}
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
	
	@Column(name="CategoriesStatus")
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	/*
	@ManyToOne(cascade=CascadeType.MERGE)
	@JoinColumn(name="ParentId", referencedColumnName="CategoriesId", nullable=true)
	public Category getParent() {
		return parent;
	}
	public void setParent(Category parent) {
		this.parent = parent;
	}
	
	@OneToMany(cascade=CascadeType.MERGE, fetch=FetchType.EAGER)
	@JoinColumn(name="ParentId", referencedColumnName="CategoriesId")
	public Set<Category> getChildren() {
		return children;
	}
	public void setChildren(Set<Category> children) {
		this.children = children;
	}
	*/
}
